function EFFECT:Init( data )
	self.Lifetime = CurTime() + 0.5
	self.StartPosition 	= data:GetStart()
	self.EndPosition	= data:GetOrigin()
	self.LastThink = CurTime()
	self.Thickness = 10

	local Owner = data:GetEntity().Owner
	local ViewModel = Owner == LocalPlayer()

	-- If it's the local player we start at the viewmodel
	if ( ViewModel ) then
	
		local vm = Owner:GetViewModel()
		if (!vm || vm == NULL) then return end
		local attachment = vm:GetAttachment( 1 )
		self.StartPosition = attachment.Pos
	
	else
	-- If we're viewing another player we start at their weapon
	
		local vm = Owner:GetActiveWeapon()
		if (!vm || vm == NULL) then return end
		local attachment = vm:GetAttachment( 1 )
		self.StartPosition = attachment.Pos

	end
	
	self.Entity:SetRenderBoundsWS( self.EndPosition, self.StartPosition, Vector() * 8 )
end

function EFFECT:Think()
	if CurTime() > self.Lifetime then
		return false
	end
	
	-- Make the beam gradually smaller.
	self.Thickness = self.Thickness - ( ( CurTime() - self.LastThink ) * 20 )
	
	self.LastThink = CurTime()
	
	return true
end

function EFFECT:Render()
	render.SetMaterial( Material( "cable/redlaser" ) )
	render.DrawBeam( self.StartPosition, self.EndPosition, self.Thickness, 0, 0, Color( 0, 100, 255, 255 ) )
end
